<?php
include_once '../clases/EntregaEnf.php';

    $tc = $_REQUEST['tc'];
    
    if ($tc == 1){
        $codser = $_REQUEST['codservi'];
        
        $datos = new EntregaEnf("", "", "", "", "", "", "", "","");
        $datos->listaTablerosEnh($codser);
    }
    else if ($tc == 2){
        $tablero = $_REQUEST['oid'];
        $paciente = $_REQUEST['pac'];
        $diagnostico = utf8_decode($_REQUEST['diag']);
        $observaciones =utf8_decode( $_REQUEST['obs']);
        $fecha = $_REQUEST['fecha'];   
        $segregacion = $_REQUEST['n'];
        $hora = $_REQUEST['hora'];
        
        $fechaIng = date('Y-m-d',strtotime($fecha));
        
        $datos = new EntregaEnf("", "", $tablero, $paciente, $fechaIng, $diagnostico, $segregacion, $observaciones,$hora);
        $datos->insertardatos();
    }
    else if($tc == 3){
        
        $tablero = $_REQUEST['oid'];
        $paciente = $_REQUEST['pac'];
        $segregacion = $_REQUEST['n'];
        
        $datos = new EntregaEnf("", "", $tablero, $paciente, "", "", $segregacion, "","");
        $datos->segregacion();
    }
    else if($tc == 4){
        $paciente = $_REQUEST['pac'];
        
        $datos = new EntregaEnf("", "", "", $paciente, "", "", "", "","");
        $datos->datosPac();
    }
    else if($tc == 5){
        $paciente = $_REQUEST['pac'];
        
        $datos = new EntregaEnf("", "", "", $paciente, "", "", "", "","");
        $datos->alergias();
    }
    else if($tc == 6){
        $CodigoServicio = $_REQUEST['CodigoServicio'];
        
        $datos = new EntregaEnf("", "", "", "", "", "", "", "", "");
        $datos->Imprimir($CodigoServicio);
    }
    else if($tc == 7){
        $Documento = $_REQUEST['Documento'];
        
        $datos = new EntregaEnf("", "", "", "", "", "", "", "", "");
        $datos->Especialidades($Documento);
    }
    
?>
